<!--
 * @Description: 
 * @Date: 2022-07-08 11:35:32
 * @LastEditTime: 2023-07-21 17:22:58
 * @FilePath: \jsnode\css\test.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>css3过渡练习-进度条</title>
    <style>
        .bar {
            width: 150px;
            height: 15px;
            border: 1px solid red;
            /* 将边框来设置一定的圆角弧度，这一点也是很关键的 */
            /* 要想要设置一定的弧度，用到的就是border-radius 非常关键*/
            border-radius: 7px;
        }

        .bar_in {
            width: 50%;
            height: 100%;
            background-color: green;

            /* 谁做过渡给谁加属性即可 */
            transition: all .7s;

        }

        /* 经过的时候肯定是经过父盒子，才会发生这么大的变化 */
        .bar:hover .bar_in {
            width: 100%;
        }

        #test1 {
            width: 100px;
            height: 100px;
            background-color: palevioletred;
        }
    </style>
</head>

<body>
    <div>
        <div id="test1">
            div1
        </div>
        <div id="test1">div2</div>
    </div>
</body>

</html>